import React from 'react';
import {Menu} from 'antd'
import {UserOutlined} from'@ant-design/icons';
import {NavLink, Redirect, Route, Switch} from 'react-router-dom';
import CityUpdate from "../../pages/Medata/CityUpdate/CityUpdate";
import ViewTemplate from "../../pages/components/ViewTemplate/ViewTemplate";
import PlateTrend from "../../pages/Medata/PlateTrend/PlateTrend";
export default (props)=>{
	console.log('cify', props);
	let {pathname}=props.location;
	return (
		<ViewTemplate pathname={pathname}>
			<Menu.ItemGroup icon={<UserOutlined />} title="我的数据">
				<Menu.Item key="/meData"><NavLink to="/meData">城市更新</NavLink></Menu.Item>
				<Menu.Item key="/meData/plate-trend"><NavLink to='/meData/plate-trend'>板块趋势</NavLink></Menu.Item>
				<Menu.Item key="3"><NavLink to='/'>简报数据</NavLink></Menu.Item>
				<Menu.Item key="4"><NavLink to='/'>暂时废弃</NavLink></Menu.Item>
				<Menu.Item key="5"><NavLink to='/'>新房_土城</NavLink></Menu.Item>
			</Menu.ItemGroup>
			<Switch>
				<Route exact path="/meData" component={CityUpdate} />
				<Route path="/meData/plate-trend" component={PlateTrend} />
				<Redirect to={{ pathname: "/meData" }} />
			</Switch>
		</ViewTemplate>)
}
